//
//  XGNewViewController.m
//  BSBuDeJie
//
//  Created by monkey on 2018/12/10.
//  Copyright © 2018 itcast. All rights reserved.
//

#import "XGNewViewController.h"
#import "XGRecommendTableViewController.h"

@interface XGNewViewController ()

@end

@implementation XGNewViewController

#pragma mark - 控制器生命周期方法

- (void)viewDidLoad
{
    [super viewDidLoad];
    
    self.view.backgroundColor = [UIColor whiteColor];
    // 设置导航栏内容
    [self setUpNavigationItem];
}

- (void)setUpNavigationItem
{
    UIButton *leftButton = [UIButton buttonWithImageName:@"MainTagSubIcon" highlightedImageName:@"MainTagSubIconClick" target:self action:@selector(recommendAction)];
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:leftButton];
    
    UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"MainTitle"]];
    self.navigationItem.titleView = imageView;
}

#pragma mark - 事件监听

- (void)recommendAction
{
    [self.navigationController pushViewController:[[XGRecommendTableViewController alloc] init] animated:YES];
}

@end
